<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-for入门</title>
</head>
<body>
    <div id="app">
      <p v-for="(name,index) in names">
          {{index + 1}}:{{name}}
      </p>
    </div>
</body>
<script type="module">
  import {createApp} from 'https://unpkg.com/vue@3/dist/vue.esm-browser.js'
  createApp({
    data(){
      return {
          names:['张三','王五','赵六','小明','小李']
      }
    }
  }).mount('#app')
</script>
</html>